using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace qPrintComponent
{
    //typedef struct _PRINTER_INFO_1 { 
    //  DWORD  Flags; 
    //  LPTSTR pDescription; 
    //  LPTSTR pName; 
    //  LPTSTR pComment; 
    //} PRINTER_INFO_1, *PPRINTER_INFO_1; 
    
    public sealed class PrinterInfo1 : qSafePrinterInfo
    {
        internal PrinterInfo1(SafeHandle PrinterHandle)
            : base(PrinterHandle,1)
        {}
        
        public override string ToString()
        {
            return Name;
        }
        [Description(@"Specifies information about the returned data.")]
        public Int32 Flags
        {
            get { return GetIntField(0); }
        }
        [Description(@"A string that describes the printer. The string contains the pPrinterName, pDriverName, and pComment members of the PRINTER_INFO_2 structure concatenated and separated by commas. Specifies information about the returned data.")]
        public string Description
        {
            get { return GetStringField(1); }
        }
        [Description(@"A string that specifies the name of the printer.")]
        public string Name
        {
            get { return GetStringField(2); }
        }
        [Description(@"A brief description of the printer.")]
        public string Comment
        {
            get { return GetStringField(3); }
        }
    }
}

